package com.cnap.model.cloud;

/**
 * 枚举类型
 *
 * @author dyq
 */
public enum CloudVendorsEnum {
    HuaWeiCloud("华为云","huaweicloud","Huawei","public"),

    Aliyun("阿里云","aliyun","Aliyun","public"),

    TencentCloud("腾讯云","tencentCloud","Tencent","public"),

    WoCloud("联通云","Wocloud","Wocloud","public"),

    Openstack("Openstack","Openstack","Openstack","private"),

    InspurCloud("浪潮InCloud","InspurInCloud","InspurInCloud","private"),

    PrivateCloud("私有云","privateCloud","private","private");
    // 注释
    private String chineseDescribe;
    // 注释
    private String describe;
    // 注释
    private String cloudType;
    // 注释
    private String cloutScope;

    CloudVendorsEnum(String chineseDescribe, String describe, String cloudType, String cloutScope) {
        this.chineseDescribe = chineseDescribe;
        this.describe = describe;
        this.cloudType = cloudType;
        this.cloutScope = cloutScope;
    }

    /**
     * get
     *
     * @return CloutScope
     */
    public String getCloutScope() {
        return cloutScope;
    }

    /**
     * 根据type查询describe
     *
     * @param type type
     * @return describe
     */
    public static String changeFromCloudTypeToDescribe(String type) {
        for (CloudVendorsEnum enumObj : CloudVendorsEnum.values()) {
            if (enumObj.getCloudType().equals(type)) {
                return enumObj.getDescribe();
            }
        }
        return type;
    }

    /**
     * 根据describe查询type
     *
     * @param describe describe
     * @return type
     */
    public static String changeFromDescribeToCloudType(String describe) {
        for (CloudVendorsEnum enumObj : CloudVendorsEnum.values()) {
            if (enumObj.getDescribe().equals(describe)) {
                return enumObj.getCloudType();
            }
        }
        return describe;
    }

    /**
     * get
     *
     * @return ChineseDescribe
     */
    public String getChineseDescribe() {
        return chineseDescribe;
    }

    /**
     * set
     *
     * @param chineseDescribe chineseDescribe
     */
    public void setChineseDescribe(String chineseDescribe) {
        this.chineseDescribe = chineseDescribe;
    }

    /**
     * get
     *
     * @return Describe
     */
    public String getDescribe() {
        return describe;
    }

    /**
     * set
     *
     * @param describe describe
     */
    public void setDescribe(String describe) {
        this.describe = describe;
    }

    /**
     * get
     *
     * @return CloudType
     */
    public String getCloudType() {
        return cloudType;
    }

    /**
     * set
     *
     * @param cloudType cloudType
     */
    public void setCloudType(String cloudType) {
        this.cloudType = cloudType;
    }
}
